package com.neural.descriptor;

public class Point {
	
	private final int xPos;
	private final int yPos;

	public Point(int neuronNum, SizeDescriptor size) {
		this(neuronNum % size.getSizeY(), neuronNum / size.getSizeY());
	}
	
	public Point(int xPos, int yPos) {
		this.xPos = xPos;
		this.yPos = yPos;
	}

	public int getXPos() {
		return xPos;
	}

	public int getYPos() {
		return yPos;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof Point)) {
			return false;
		}
		Point other = (Point) obj;
		return (getXPos()==other.getXPos() && getYPos()==other.getYPos());
	}
}
